import type { App } from 'vue'
import * as components from './components'
import Logger from './util/Logger'
import IdUtil from './util/IdUtil'
import MD5Util from './util/md5/MD5Util'
import DateUtil from './util/DateUtil'
import UriUtil from './util/UriUtil'
import PinYinUtil from './util/PinYinUtil'
import CacheUtil from './util/CacheUtil'
import StringUtil from './util/StringUtil'
import NumberUtil from './util/NumberUtil'
import IdCardUtil from './util/IdCardUtil'
import ChatMessage from './components/HChat/ChatMessage'
// 导入样式
import './styles/index.css'
//导出工具类
export { Logger, IdUtil, MD5Util, DateUtil, UriUtil, PinYinUtil, CacheUtil, StringUtil, NumberUtil, IdCardUtil, ChatMessage }
//导出组件
export * from './components'

export default {
  install(app: App) {
    Object.values(components).forEach(component => {
      if (typeof component.install === 'function') {
        app.use(component)
      }
    })
  }
}

